home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
text
/
edit
/
amis.lha
/
amis
/
scripts
/
AGIndexCreator.rexx
next >
Wrap
OS/2 REXX Batch file
|
1996-12-30
|
1KB
|
57 lines
/* AmigaGuide Index creator for AMIS */
OPTIONS RESULTS
SIGNAL ON SYNTAX
SIGNAL ON BREAK_C
'Query NAME'
name=result
'Query POS'
pos=result
'File NAME="'||name||'.index" NEW'
'AutoIndent OFF'
'Viewer NAME="AmigaGuide"'
'Insert TEXT="¶@node INDEX¶¶¶@endnode¶"'
'CursUp 2'
'SelectWindow NAME="'||name||'"'
'Query LINES'
lines=result
'Cursup TOP'
'Graphics OFF'
line=1
'GetLine'
text=result
do while line<=lines
if upper(left(text,5))="@NODE" then
do
'SelectWindow NAME="'||name||'.index"'
parse var text '@node' test1 test2
if test2="" then
do
test2=test1
test1=left(test1,length(test1)-1)
end
test1=strip(strip(test1),,'"')
test2=strip(strip(left(test2,length(test2)-1)),,'"')
'Insert TEXT=" @{*"'||test2||'*" link *"'||test1||'*"}¶"'
'SelectWindow NAME="'||name||'"'
end
line=line+1
'Goto LINE='||line
'GetLine'
text=result
end
'Goto POS='||pos
'Graphics ON'
'SelectWindow NAME="'||name||'.index"'
'CursUp TOP'
exit
SYNTAX:
say "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
exit
BREAK_C:
say "*** Break"
exit